package ltd.cheers.mall.dao;

import ltd.cheers.mall.entity.CheersMallOrder;
import ltd.cheers.mall.util.PageQueryUtil;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CheersMallOrderMapper {
    int deleteByPrimaryKey(Long orderId);

    int insert(CheersMallOrder record);

    int insertSelective(CheersMallOrder record);

    CheersMallOrder selectByPrimaryKey(Long orderId);

    CheersMallOrder selectByOrderNo(String orderNo);

    int updateByPrimaryKeySelective(CheersMallOrder record);

    int updateByPrimaryKey(CheersMallOrder record);

    List<CheersMallOrder> findCheersMallOrderList(PageQueryUtil pageUtil);

    int getTotalCheersMallOrders(PageQueryUtil pageUtil);

    List<CheersMallOrder> selectByPrimaryKeys(@Param("orderIds") List<Long> orderIds);

    int checkOut(@Param("orderIds") List<Long> orderIds);

    int closeOrder(@Param("orderIds") List<Long> orderIds, @Param("orderStatus") int orderStatus);

    int checkDone(@Param("orderIds") List<Long> asList);

    List<CheersMallOrder> selectByUserId(String userId);

    List<CheersMallOrder> selectFinishOrdersByUserId(String userId);

    List<CheersMallOrder> selectOrdersByOrderStatus(int orderStatus);
}